package com.sleep.psy.external_server.business.resourse.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sleep.psy.external_server.business.resourse.entity.ResourseScale;
import com.sleep.psy.external_server.business.resourse.entity.dto.Scale;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 量表资源 Mapper 接口
 * </p>
 *
 * @author wenliguo
 * @since 2025-08-12
 */
public interface ResourseScaleMapper extends BaseMapper<ResourseScale> {

    /**
     * 通过分类code获取有效的量表
     * @author wenliguo
     * @date 2025/6/5 13:42
     * @param page 分页
     * @param code 分类code
     * @return com.baomidou.mybatisplus.core.metadata.IPage<com.sleep.psy.main_server.business2.scale.entity.dto.Scale>
     */
    IPage<Scale> selectScaleByCode(@Param("page") IPage<Scale> page, @Param("code") String code);

    /**
     * 获取自助训练的量表
     * @author wenliguo
     * @date 2025/8/28 11:14
     * @param page  分页
     * @return com.baomidou.mybatisplus.core.metadata.IPage<com.sleep.psy.external_server.business.resourse.entity.dto.Scale>
    */
    IPage<Scale> selectAutoTraingScales(@Param("page") IPage<Scale> page);

    /**
     * 获取睡眠评估量表
     * @author wenliguo
     * @date 2025/9/9 11:49
     * @return com.sleep.psy.external_server.business.resourse.entity.ResourseScale
    */
    ResourseScale selectSleepEvaluate();

}
